import 'package:flutter_learn_vi/src/bean/bean_bloc.dart';
import 'package:flutter_learn_vi/src/net/dio_utils.dart';
import 'package:flutter_learn_vi/src/utils/toast_utils.dart';

/// 创建人： Created by zhaolong
/// 创建时间：Created by  on 2021/1/17.
///
/// 可关注公众号：我的大前端生涯   获取最新技术分享
/// 可关注网易云课堂：https://study.163.com/instructor/1021406098.htm
/// 可关注博客：https://blog.csdn.net/zl18603543572
///
/// 代码清单
///代码清单
class BlocModel {
  Future<BlocBean> getBlocDetailsRquest() async {
    //获取集团信息
    ResponseInfo responseInfo = await DioUtils.instance.getRequest(
      url: HttpHelper.blocInfo,
    );
    if (responseInfo.success) {
      return BlocBean.fromJson(responseInfo.data);
    } else {
      ToastUtils.showToast(responseInfo.message);
    }
    return null;
  }
}
